import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:repair_pda/controller/test_controller.dart';
// 测试网络请求
class TestPage extends StatefulWidget {
  const TestPage({super.key});

  @override
  State<TestPage> createState() => _TestPageState();
}

class _TestPageState extends State<TestPage> {
  final TestController controller = Get.put(TestController());
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('GetX example'),
      ),
      body: Center(
        child: Obx(
                () => Text('result ${controller.testResult}',style: TextStyle(fontSize: 24),)
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () async {
          await controller.performTest([3688]);
        },
        child: const Icon(Icons.add),
      ),
    );
  }
}
